package com.itheima.core.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itheima.common.fdfs.FastDFSUtils;

@Service("uploadService")
@Transactional
public class UploadServiceImpl implements UploadService{

	@Override
	public String uploadPic(byte[] pic, String name, long size) {
		try {
			return FastDFSUtils.uploadPic(pic, name, size);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
